<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>友盟配置管理 </title>
<@fm.header />
<script type="text/javascript" src="/resources/js/common.js"></script>
<script type="text/javascript" src="/resources/js/umConfigInfo/umConfigInfo.js"></script>
</head>
<body class="cmp-list-body">

<div id="tb" style="padding:3px">
	<span>应用名称:</span>
	<input id="sapkName" class="easyui-textbox" style="width: 155px;"/>
	<span>渠道:</span>
	<input id="schannel" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="toAdd();">新增</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="toEdit();">修改</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doDel();">删除</a>
</div>
<table id="tt" title="友盟配置管理" toolbar="#tb" rownumbers="true" 
	singleSelect="true" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
		    <th align="center" width="8%" field="apkName">应用名称</th>
		    <th align="center" width="8%" field="channel">渠道</th>
		    <th align="center" width="5%" field="appId">应用appId</th>
		    <th align="center" width="4%" field="brushCount">待刷总量</th>
		    <th align="center" width="5%" field="onlineTime">在线时长（秒）</th>
		    <th align="center" width="5%" field="nextDayRetention">次日留存率</th>
		    <th align="center" width="4%" field="openProvince" formatter="formatterProvince" >省份配置</th>
			<th align="center" width="4%" field="openStatus" formatter="formatStatus">状态</th>
		    <th align="center" width="4%" field="retentOpenStatus" formatter="formatStatus">留存状态</th>
		    <th align="center" width="8%" field="createDate">创建时间</th>
		    <th align="center" width="8%" field="modifyDate">修改时间</th>
        </tr>
    </thead>   
</table>

<div id="addWin" class="easyui-window" title="友盟配置管理|新增修改" closed="true" collapsible="false" minimizable="false"  maximizable="false" style="width:500px;height:450px"   
        data-options="iconCls:'icon-save',modal:true">
     <div fit="true">
        <form id="addForm"  method="post" >
            <input type="hidden" id="idId"  name="id" />   
            <table>
		        <tr>
		             <td align="left">渠道</td>
		             <td><input id="channel" class="easyui-validatebox" data-options="required:true" name="channel" style="width:300px"></input></td>
		        </tr>	
		        <tr>
		             <td align="left">选择应用</td>
		             <td><span id="apkName"></span>
		              <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="selectApp();">选择应用配置</a>
		             <input id="appInfoId" name="appInfoId" type="hidden" ></input></td>
		        </tr>
		        <tr>
		             <td align="left">应用appId</td>
		             <td><input id="appId" class="easyui-validatebox" name="appId" style="width:300px"></input></td>
		        </tr>
		        <tr>
		             <td align="left">待刷总量</td>
		             <td><input id="brushCount" class="easyui-validatebox" name="brushCount" style="width:300px"></input></td>
		        </tr>
		         <tr>
		             <td align="left">在线时长（秒）</td>
		             <td><input id="onlineTime" class="easyui-validatebox" name="onlineTime" style="width:300px"></input></td>
		        </tr>
		         <tr>
		             <td align="left">次日留存率</td>
		             <td><input id="nextDayRetention" class="easyui-validatebox" name="nextDayRetention" style="width:300px"></input></td>
		        </tr>
		        <tr>
		             <td align="left">状态</td>
		             <td>
		             <select class="easyui-combobox" id="openStatus" name="openStatus" panelHeight="auto" style="width:155px" data-options="required:true">
	                	<option value="1" selected>启用</option>
	                	<option value="0" >关闭</option>
		             </select>
		             </td>
		        </tr>	
		        <tr>
		             <td align="left">留存状态</td>
		             <td>
		             <select class="easyui-combobox" id="retentOpenStatus" name="retentOpenStatus" panelHeight="auto" style="width:155px" data-options="required:true">
	                	<option value="1" selected>启用</option>
	                	<option value="0" >关闭</option>
		             </select>
		             </td>
		        </tr>	
           </table>
        </form>
        <div style="padding: 25px; text-align: center;">
            <a href="#" class="easyui-linkbutton" onclick="cancel();">取消</a>
            <a href="#" class="easyui-linkbutton" onclick="save();">保存</a> 
        </div>
    </div>
</div>

<div id="selectWin" title="选择应用" class="easyui-window" closed="true" collapsible="false" minimizable="false"  maximizable="false"  style="width:500px;height:500px">
    <div fit="true" class="easyui-layout" style="overflow:scroll">
		<table id="tbAppInfo" class="easyui-datagrid" fitColumns="true" rownumbers="true" singleSelect="true"  
			pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]" 
			selectOnCheck="true" idField="id" toolbar="#searchBar" data-options="onDblClickRow:onDblClickRow" >    
					<thead>
						<tr>
							<th align="left" width="20%" field="apkName">应用名称</th>
							<th align="left" width="30%" field="packageName">应用包名</th>
						</tr>
					 </thead>   
		</table>  
	</div>
</div>

<div id="searchBar" style="padding:3px">
	<span>应用名称</span>
	<input id="appName" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearchApp();">查询</a>
</div>

</body>
</html>